﻿using Messenger.WinDialogs.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Messenger.WinDialogs
{
    public class WinDialog
    {
        public static WinDialogResult ShowDialog(ShowWinDialogContext context)
        {
            DialogWin win = new DialogWin(context);
            bool? ret = win.ShowDialog();

            context.View.HadleResult(win.MessageBoxResult);

            context.View.Dispose();

            WinDialogResult result = new WinDialogResult()
            {
                Result = ret,
                MessageBoxResult = win.MessageBoxResult,
            };
            return result;
        }
    }
    public class WinDialogResult
    {
        public bool? Result { get; set; }

        public MessageBoxResult MessageBoxResult { get; set; }
    }

}
